import Vue from 'vue'
import router from './router'
import store from './vuex'
import App from './App.vue'

import Mock from './mock'

import api from '@/api'

import { NavBar, Button, Cell, CellGroup, Image, Toast, Icon, Loading, Lazyload, Skeleton } from 'vant'

Vue.use(NavBar)
Vue.use(Button)
Vue.use(Cell)
Vue.use(CellGroup)
Vue.use(Image)
Vue.use(Toast)
Vue.use(Icon)
Vue.use(Loading)
Vue.use(Lazyload)
Vue.use(Skeleton)

Vue.prototype.$toast = Toast

// 挂载api请求
Vue.prototype.$api = api

Vue.config.productionTip = false

Mock.init()

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
